home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 February: Tool Chest / Dev.CD Feb 94.toast / Tool Chest / Development Platforms / MPW Related / MPW Interfaces / CIncludes / stdiostream.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-09-17  |  1.2 KB  |  52 lines  |  [TEXT/MPS ]

  1. /*ident    "@(#)C++env:incl-master/const-headers/stdiostream.h    1.2" */
  2. /**************************************************************************
  3.                         Copyright (c) 1984 AT&T
  4.                           All Rights Reserved   
  5.  
  6.         THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T
  7.       
  8.         The copyright notice above does not evidence any        
  9.         actual or intended publication of such source code.
  10.  
  11. *****************************************************************************/
  12. #ifndef __STDSTREAM__
  13. #define __STDSTREAM__
  14.  
  15. #include <iostream.h>
  16. #include <stdio.h>
  17.  
  18. class stdiobuf : public streambuf {
  19.     /*** stdiobuf is obsolete, should be avoided ***/
  20. public: // Virtuals
  21.     virtual int    overflow(int=EOF);
  22.     virtual int    underflow();
  23.     virtual int    sync() ;
  24.     virtual streampos
  25. #ifdef __ATT2_1
  26.             seekoff(streamoff,ios::seek_dir,int) ;
  27. #else  /*__ATT2_1*/
  28.             seekoff(streamoff,seek_dir,int) ;
  29. #endif /*__ATT2_1*/
  30.     virtual int    pbackfail(int c);
  31. public:
  32.             stdiobuf(FILE* f) ;
  33.     FILE*        stdiofile() { return fp ; }
  34.     virtual        ~stdiobuf() ;
  35. private:
  36.     FILE*        fp ;            
  37.     int        last_op ;
  38.     char        buf[2];
  39. };
  40.  
  41. class stdiostream : public ios {
  42. public:
  43.             stdiostream(FILE*) ;
  44.             ~stdiostream() ;
  45.     stdiobuf*    rdbuf() ;
  46. private:
  47.     stdiobuf    buf ;
  48. };
  49.  
  50. #endif
  51.  
  52.